home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / circuits / spice2g6.z / spice2g6 / spice / Fortran / cdiv.f < prev    next >
Encoding:
Text File  |  1989-02-03  |  354 b   |  13 lines

  1.       subroutine cdiv(xr,xi,yr,yi,cr,ci)
  2. c.. ok if cr and ci are really xr and xi or yr and yi
  3.       implicit double precision (a-h,o-z)
  4.       xrtemp=xr
  5.       xitemp=xi
  6.       yrtemp=yr
  7.       yitemp=yi
  8.       amag2=yrtemp*yrtemp+yitemp*yitemp
  9.       cr=(xrtemp*yrtemp+xitemp*yitemp)/amag2
  10.       ci=(xitemp*yrtemp-xrtemp*yitemp)/amag2
  11.       return
  12.       end
  13.